﻿using System.Xml.Serialization;
using Harvest.Api.Types;

namespace Harvest.Api.Model.Internal
{

  //<contact>
  //  <client-id type="integer">327070</client-id>
  //  <created-at type="datetime">2010-04-28T08:10:57Z</created-at>
  //  <email>thorsten@tester.com</email>
  //  <fax>fax</fax>
  //  <first-name>Thorsten</first-name>
  //  <id type="integer">123149</id>
  //  <last-name>Tester</last-name>
  //  <phone-mobile>mobile</phone-mobile>
  //  <phone-office>office</phone-office>
  //  <title>Herr</title>
  //  <updated-at type="datetime">2010-04-28T08:10:57Z</updated-at>
  //</contact>

    /// <summary>
    /// 
    /// </summary>
    /// <remarks>
    /// Don't change the XmlElement attributes, otherwise (de)serialization will fail.
    /// </remarks>
    [XmlRoot(ElementName = "contact", IsNullable = false)]
    public class ContactItem
    {

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "id", IsNullable = true)]
        public NullableInt Id { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "client-id", IsNullable = true)]
        public NullableInt ClientId { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "email")]
        public string Email { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "first-name")]
        public string FirstName { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "last-name")]
        public string LastName { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "phone-office")]
        public string OfficePhone { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "phone-mobile")]
        public string MobilePhone { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlElement(ElementName = "fax")]
        public string Fax { get; set; }

    }

}
